package org.dev.pf.iof.systemmanage.action;

import java.util.List;

import org.dev.pf.iof.base.action.AbstractCommonAction;
import org.dev.pf.iof.systemmanage.model.IofUserinfo;
import org.dev.pf.iof.systemmanage.service.IUserManageService;

public class UserManageAction extends AbstractCommonAction {

	private List<IofUserinfo> gridModel;

	public List<IofUserinfo> getGridModel() {
		return gridModel;
	}

	public void setGridModel(List<IofUserinfo> gridModel) {
		this.gridModel = gridModel;
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 5899844442318553766L;

	private void init() {
		this.setPage(1);
		this.setRows(10);
		this.setTotal(1);
		this.setRecord(1);
	}

	public String forShowUserManageMain() throws Exception {
		try {
			return INPUT;
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
	}

	public String forSearchUserManage() throws Exception {
		init();
		IUserManageService theIUserManageService = (IUserManageService) getBean(IUserManageService.class);

		setGridModel(theIUserManageService.searchUser(null));

		return SUCCESS;

	}

}
